import request from '@/utils/request'


// 获取用户钱包信息
export function getAmount(id) {
    return request({
        url: 'api/wallet/getAmount/' + id,
        method: 'get',
    })
}
// 获取用户消费流水
export function listWallet(id) {
    return request({
        url: 'api/wallet/list/' + id,
        method: 'get',
    })
}
//初始化钱包
export function initWallet(data) {
    return request({
        url: 'api/wallet/init',
        method: 'post',
        data
    })
}
//充值
export function recharge(data) {
    return request({
        url: 'api/wallet/recharge',
        method: 'post',
        data
    })
}
//支付
export function pay(uid, password, orderid) {
    return request({
        url: 'api/wallet/pay',
        method: 'post',
        data: {
            uid,
            password,
            orderid,
        }
    })
}